package com.example.observer;


import java.util.Observable;

public class Watched extends Observable {

    private String data = "原始状态 -- 1";
    public String getData(){
        return data;
    }
    public void setData(String data){
        if(!this.data.equals(data)){
            this.data=data;
            setChanged();
        }
        notifyObservers();
    }
}
